<table width="100%"><tr><td width="20%">
<a href="../index.html">&lt; index</a><br />
<a href="index.html">&lt; 2. Console</a><br />
<a href="console_drawing.html">&lt; 2.2 Drawing on the root console</a>
</td><td width="60%">
<p align="center">
=====================================<br />
Background effect flags<br />
=====================================<br />
</p></td><td width="20%">
</td></tr></table>
<style type="text/css">
.code { color:#444444; background-color:#EEEEEE;}
pre { color:#444444; background-color:#EEEEEE;}
table.param td { border : 1px solid #000000; }
th { background-color: #44BBFF; color: #FFFFFF }
table.none td { border : 0 }
</style>
For the python version, remove TCOD_ :
libtcod.BKGND_NONE
<p class="code"><pre>
typedef enum {
	TCOD_BKGND_NONE,
	TCOD_BKGND_SET,
	TCOD_BKGND_MULTIPLY,
	TCOD_BKGND_LIGHTEN,
	TCOD_BKGND_DARKEN,
	TCOD_BKGND_SCREEN,
	TCOD_BKGND_COLOR_DODGE,
	TCOD_BKGND_COLOR_BURN,
	TCOD_BKGND_ADD,
	TCOD_BKGND_ADDA,
	TCOD_BKGND_BURN,
	TCOD_BKGND_OVERLAY,
	TCOD_BKGND_ALPH	
} TCOD_bkgnd_flag_t;
</pre></p>
This flag is used by most functions that modify a cell background color. It defines how the console's current background color is used to modify the cell's existing background color :<br />
TCOD_BKGND_NONE : the cell's background color is not modified.<br />
TCOD_BKGND_SET : the cell's background color is replaced by the console's default background color : newbk = curbk.<br />
TCOD_BKGND_MULTIPLY : the cell's background color is multiplied by the console's default background color : newbk = oldbk * curbk<br /> 
TCOD_BKGND_LIGHTEN : newbk = MAX(oldbk,curbk)<br />
TCOD_BKGND_DARKEN  : newbk = MIN(oldbk,curbk)<br />
TCOD_BKGND_SCREEN  : newbk = white - (white - oldbk) * (white - curbk) // inverse of multiply : (1-newbk) = (1-oldbk)*(1-curbk)<br />
TCOD_BKGND_COLOR_DODGE : newbk = curbk / (white - oldbk)<br />
TCOD_BKGND_COLOR_BURN : newbk = white - (white - oldbk) / curbk<br />
TCOD_BKGND_ADD : newbk = oldbk + curbk<br />
TCOD_BKGND_ADDALPHA(alpha) : newbk = oldbk + alpha*curbk<br />
TCOD_BKGND_BURN : newbk = oldbk + curbk - white<br />
TCOD_BKGND_OVERLAY : newbk = curbk.x <= 0.5 ? 2*curbk*oldbk : white - 2*(white-curbk)*(white-oldbk)<br />
TCOD_BKGND_ALPHA(alpha) : newbk = (1.0f-alpha)*oldbk + alpha*(curbk-oldbk)<br />
<br />
Note that TCOD_BKGND_ALPHA and TCOD_BKGND_ADDALPHA are MACROS that needs a float parameter between (0.0 and 1.0). TCOD_BKGND_ALPH and TCOD_BKGND_ADDA should not be used directly (else they will have the same effect as TCOD_BKGND_NONE).<br />
Example :<br />
<p class="code"><pre>
</pre></p>
